import java.util.*;

public class Solution1 {
    ArrayList<Integer>  list;
    int []reset;
    public Solution1(int[] nums) {
        reset=new int[nums.length];
        list=new ArrayList<>();
        for (int i=0;i<nums.length;i++){
            list.add(nums[i]);
            reset[i]=nums[i];
        }
    }

    /** Resets the array to its original configuration and return it. */
    public int[] reset() {
        return reset;
    }

    /** Returns a random shuffling of the array. */
    public int[] shuffle() {
        Collections.shuffle(list);
        int []res=new int[list.size()];
        Iterator<Integer> i=list.iterator();
        int arr=0;
        while (i.hasNext()){
            res[arr]=i.next();
            arr++;
        }
        return res;
    }
}
